<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改使用记录')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-use-edit" th:object="${examinationUse}">
            <input name="examId" th:field="*{examId}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label ">记录编号：</label>
                <div class="col-sm-8">
                    <input name="examId" th:field="*{examId}" class="form-control" type="text" disabled>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label ">设备名称：</label>
                <div class="col-sm-8">
                    <input name="examinationName" th:field="*{examinationName}" class="form-control" type="text" disabled>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label ">所属部门：</label>
                <div class="col-sm-8">
                    <input name="deptName" th:field="*{deptName}" class="form-control" type="text" disabled>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label ">存放位置：</label>
                <div class="col-sm-8">
                    <input name="storeroomName" th:field="*{storeroomName}" class="form-control" type="text" disabled>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label ">操作人：</label>
                <div class="col-sm-8">
                    <input name="userName" th:field="*{userName}" class="form-control" type="text" disabled>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">操作时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="createTime" disabled th:value="${#dates.format(examinationUse.createTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">设备型号：</label>
                <div class="col-sm-8">
                    <select name="examinationType" class="form-control m-b" disabled th:with="type=${@dict.getType('examination_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{examinationType}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">使用状态：</label>
                <div class="col-sm-8">
                    <select name="useStatus" class="form-control m-b" disabled th:with="type=${@dict.getType('examination_use_status')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{useStatus}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">设备状态：</label>
                <div class="col-sm-8">
                    <select name="examinationStatus" class="form-control m-b" disabled th:with="type=${@dict.getType('examination_status')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{examinationStatus}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">操作名称：</label>
                <div class="col-sm-8">
                    <select name="operationName" class="form-control m-b" disabled th:with="type=${@dict.getType('examination_operation_name')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{operationName}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="note" class="form-control" disabled>[[*{note}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label" readonly>附件：</label>
                <div class="col-sm-8">
                    <input type="hidden" name="file" th:field="*{file}">
                    <div class="file-loading">
                        <input class="form-control file-upload" id="file" name="file" type="file" disabled>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "use/use";
        $("#form-use-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-use-edit').serialize());
            }
        }
    </script>
</body>
</html>